﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VisitorPattern.Samples;

internal class PDFVisitor : IVisitorSample
{
    public void VisitImage(ImageElement imageElement)
    {
        Console.WriteLine($"PDF 图片导出{imageElement.Url}");
    }

    public void VisitPDF(PDFElement pdfElement)
    {
        Console.WriteLine($"PDF 导出");
    }

    public void VisitTable(TableElement tableElement)
    {
        Console.WriteLine($"PDF 导出table {tableElement.Rows}x{tableElement.Columns}");
    }

    public void VisitText(TextElement textElement)
    {
        Console.WriteLine($"PDF 导出文本 {textElement.Content}");
    }
}
